#include "pm/tagsummary.h"

using namespace pm;


TagSummary::TagSummary(wxSQLite3ResultSet& res)
: id_tag    (res, wxT("id_tag"))
, tag_name  (res, wxT("tag_name"))
, cost      (res, wxT("cost"))
, id_project(res, wxT("id_project"))
{
}

GetTagSummary::GetTagSummary(const db::ID& idProject)
: id_project(idProject)
{
}

wxSQLite3Statement GetTagSummary::prepare(wxSQLite3Database& db)
{
	wxSQLite3Statement stmt = db.PrepareStatement("select id_tag, tag_name, cost, id_project from view_tags_summary where id_project = ?");
	stmt.Bind(1, id_project());
	return stmt;
}
